package top.tagao.m02_creationalPatterns.c_02_singleton;

/**
 * 饿汉式 静态内部类
 * @author fu-xiao-liu
 * @Date 2022/6/22 23:41
 */
public class Singleton5 {
    private  Singleton5(){}

    private  static class SingletonHolder{
        private static final Singleton5 S5 = new Singleton5();
    }

    public static Singleton5 getInstance(){
        return  SingletonHolder.S5;
    }
}
